/*
    PhotoFlip, a free 3d photo managment suite.
    Copyright (C) 2007  Elisée MAURER, Gaétan WALTER
    
    This file is part of PhotoFlip.
    Contact: http://www.photoflip.org/

    PhotoFlip is free software: you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
    the Free Software Foundation, either version 3 of the License, or
    (at your option) any later version.

    PhotoFlip is distributed in the hope that it will be useful,
    but WITHOUT ANY WARRANTY; without even the implied warranty of
    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
    GNU General Public License for more details.

    You should have received a copy of the GNU General Public License
    along with PhotoFlip.  If not, see <http://www.gnu.org/licenses/>.
*/

#include <libglademm/xml.h>
#include <gtkmm.h>

#include <iostream>
#include <stdexcept>

#include "photoflip.hpp"

//! main function
int main(int argc, char **argv) {
	try {
		Gtk::Main kit(argc, argv);
		Glib::thread_init();
		Gtk::GL::init(argc, argv);
		
		//Gtk::IconTheme::get_default()->append_search_path("../share/pixmaps");
		Glib::RefPtr<Gnome::Glade::Xml> refXml = Gnome::Glade::Xml::create("../share/photoflip/photoflip.glade");
		
		photoflip flip(refXml);
		kit.run(flip.getWindow());
		
		return 0;
	} catch(std::exception const& ex) {
		std::cerr << "Error: " << ex.what() << std::endl;
		return 1;
	}
}
